import {Service, action} from "adajs";

class NewsService extends Service {
    defaultData() {
        return {
            title: "",
            id: "",
            btns: [
                {action: "listen", icon: ":for-hearing"}
            ]
        };
    }

    onupdate(current, data) {
        Object.assign(current, data);
    }

    @action("load")
    load(current, id) {
        current.id = id;
    }
}

export default NewsService;